package physics;


import physics.MovementControl.SatelliteMovementController;

import common.Point3D;


public class SatelliteBox extends GameObject {
	
	private double height = 10;
	
	public SatelliteBox (){
		this.setMovementControler(new SatelliteMovementController(this));
		//this.getMovementControler().setMovement(new Point3D(0,-0.02,0));
		this.getMovementControler().setHasMomentum(true);
		this.getMovementControler().setMovementLimit(0.5);
		this.getMovementControler().setMovementFriction(0.05);
	}
	
	
	public void goForward(){
		this.getMovementControler().addMovement(this.position.getFace());
	}
	
	public void goBackward(){
		Point3D direction = this.position.getFace().clone();
		direction.negative();
		this.getMovementControler().addMovement(direction);
	}
	
	public void goLeft(){
		Point3D direction = this.position.getLeft().clone();
		direction.negative();
		this.getMovementControler().addMovement(direction);
	}
	
	public void goRight(){
		this.getMovementControler().addMovement(this.position.getLeft());
	}

	public void rotateLeft(){
		this.getMovementControler().addRotationY(-0.05);
	}
	
	public void rotateRight(){
		this.getMovementControler().addRotationY(0.05);
	}

	public void goUp(){
		Point3D direction = this.position.getUp().clone();
		this.getMovementControler().addMovement(direction);
	}
	
	public void goDown(){
		Point3D direction = this.position.getUp().clone();
		direction.negative();
		this.getMovementControler().addMovement(direction);
	}
	
}
